package fr.jade.service.nodes.factory;

import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.factory.InstantiationException;

import fr.jade.util.JadeException;

/**
 * A component interface to create remote generic factory.
 * @author nono
 * @contact noel.depalma@inrialpes.fr
 */
public interface NodeFactory
{

  /**
   * Instantiates a new generic factory on the remote pnode passed as parameter.
   *
   * @param pnode the physical node where to create the new generic factory.
   * @param vnode the virtual node mapped to the physical node.
   * @return the {@link Component} interface of the component instantiated from
   *      this factory.
   * @throws InstantiationException if the component cannot be created.
   */
  Component newNode (String pnode, String vnode) throws InstantiationException;
  
  /**
   * create a new cluster
   * @param clusterName
   * @return the {@link Component} interface of the component instantiated from
   *      this factory.
   * @throws InstantiationException
   */
  //Component newCluster (String clusterName) throws InstantiationException;
  
  //void delNode (String vnode) throws JadeException;
  
  /**
   * create a new cluster
   * @param clusterName
   * @return
   * @throws InstantiationException
   */
  //void delCluster (String clusterName) throws JadeException;
}
